<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href=" __PUBLIC__/Admin/css/pintuer.css">
<link rel="stylesheet" href=" __PUBLIC__/Admin/css/admin.css">
<link rel="stylesheet" href="__PUBLIC__/editor/css/editormd.min.css" />
<script src="__PUBLIC__/Admin/js/jquery.js"></script>
<script src="__PUBLIC__/Admin/js/pintuer.js"></script>
<script src="__PUBLIC__/js/jquery-2.0.2.js"></script>
<script src="__PUBLIC__/Admin/js/upload.js"></script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>添加成员</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" id="form-x" action="">
      <div class="form-group">
        <div class="label">
          <label>成员姓名：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="username" data-validate="required:请输入成员姓名" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>成员职称：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="" name="title" data-validate="required:请输入成员职称" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>成员照片：</label>
        </div>
        <div class="field">
          <!-- <div class="input w50" data-validate="required:请选择图片">选择图片</div> -->
          <div class="input w25 upload" id="upload">
            <img id="show_img" src="__PUBLIC__/Admin/images/default.png" alt="">
            <input type="file" id="pic" class="pic" name="pic"/>
          </div>
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>成员称号：</label>
        </div>
        <div class="field">
          <input type="text" style="width:85%" class="input w100" value="" name="discrip" data-validate="required:*请输入成员称号(如果有多个请用逗号隔开)" />
          <div class="tips"></div>
        </div>
      </div>

      <div class="form-group">
        <div class="label">
          <label>成员简介：</label>
        </div>
        <div class="field">
          <textarea name="content" data-validate="required:*请输入成员简介"></textarea>
        </div>
      </div>


      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" id="tijiao" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
<script>
    $('#pic').change(function(){
        PUB.upload.checkImg('pic','show_img');
    });
    $('#tijiao').click(function(event) {
        event.preventDefault();
        PUB.upload.upload('form-x',"{:U('Admin/user/useradd')}",'/admin/user/userlist');
    });
</script>
</body>
</html>

